<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
	
	 
	<!-- Sidebar Profile links -->
	<div id="profile-links">
		
	</div>        
	<a href="#"><img id="logo" src="<?php echo base_url()?>images/logo.png" alt="Simpla Admin logo" /></a>
	<!-- Sidebar Profile links -->
	<div id="profile-links">
		您好,<?php echo $this->session->userdata('name');?>
				<br />
				<a href="<?php echo base_url()?>main" title="View the Site">主页</a> | <a href="<?php echo base_url()?>/home/logout" title="Sign Out">退出</a>
	</div>        
	<ul id="main-nav">  <!-- Accordion Menu -->
	<!--sidebar_options 为MY_array_helper.php中函数-->
		<?php $permission = unserialize($this->session->userdata('permission'));$permission = $permission?$permission:array();?>
		<?php foreach(sidebar_options() as $key=>$value): $manu = array_shift($value);?>
			<?php if(in_array($key,$permission)):?>
			<li>
				<a href="javascript:void(0);" class="nav-top-item <?php echo $sidebar[0]==$key?'current':''; ?>"> <!-- Add the class "current" to current menu item -->
				<?php echo $manu;?>
				</a>
				<ul>
				<?php foreach($value as $k=>$v):?>
					<?php if(in_array($k,$permission)):?>
					<li><a class="<?php echo $sidebar[1]==$k?'current':''; ?>" href="<?php echo base_url().$k?>"><?php echo $v?></a></li>
					<?php endif;?>
				<?php endforeach;?>
				</ul>
			</li>
			<?php endif;?>
		<?php endforeach;?>
	</ul> <!-- End #main-nav -->	
</div></div> <!-- End #sidebar -->


